package com.zc.hadoop.RPC;

import java.io.IOException;
import java.net.InetSocketAddress;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.RPC;

public class RpcClient {
	public static void main(String[] args) throws IOException {
		// 创建一个代理类
		IHello proxy = RPC.getProxy(IHello.class, 1L, new InetSocketAddress("localhost", 10888), new Configuration());

		String result = proxy.hello("world");
		System.out.println(result);

		// 停止代理类
		RPC.stopProxy(proxy);
	}
}
